This disclosure relates generally to the field of web services. More particularly, but not by way of limitation, this disclosure refers to a method of adapting web services based on different implementations (SOAP or RESTful) to an implementation style other than that for which a web service was originally provided. For example, providing a system and method to convert an existing RESTful web service on an endpoint to expose a SOAP interface, or convert a SOAP interface to expose a RESTful web service.
In the web services world, Representational State Transfer (REST) is a design architecture that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their Universal Resource Locators (URLs). Web services clients that want to use these resources may access a particular representation by transferring application content using a small globally defined set of remote methods that describe the action to be performed on the resource.
SOAP used to be an acronym that stood for Simple Object Access Protocol. However over time the acronym was dropped and there is now no official meaning attributed to the name SOAP; it is an arbitrary name. SOAP is built on top of eXtensible Markup Language (XML). SOAP is a protocol in which operations (similar to functions or subroutines in standard programming languages) are invoked. This invocation typically causes an implementation on a server (e.g., SOAP web services endpoint) to execute some code and return a result. SOAP can be viewed as a “request-response” type of model.
Today web services are not standardized such that they may interact with requests of a plurality of protocols or design architectures. It is also clear that both SOAP and REST based web services are going to coexist in the world for the foreseeable future. Given this existing lack of standardization, there is a need for a method and system to provide translation/conversion of an existing web service such that the same web service may be more easily exposed for web applications desiring interaction in a different manner. For example, SOAP represents one type of web service prevalent today and RESTful represents a different type of web service. Therefore, software developers faced with not only technical but financial considerations may benefit from the embodiments disclosed herein.
Referring now to FIG. 1, a high level block diagram of an interconnected computer system 100 is shown. Client computer 110 represents a computer which executes a web browser and may connect (via a Universal Resource Locator (URL)) to web application server 130. In this example, web application server 130 is a consumer of web services provided by a web services provider (endpoint) 140. Communication between client computer 110, web application server 130, and endpoint 140 take place across network 120. A request across network 120 for a web service will typically be an encapsulated “message.” The message may allow for sending/receiving one or more pieces of information. This encapsulation may be accomplished in many ways, including a SOAP style request or a RESTful style request, among others. In other words, typical requests across a network are bundles of information such that multiple interactions (for a discrete piece of information) between a web application executing on web application server 130 and endpoint 140 may be minimized.
Network 120 represents a communication coupling between computers (e.g., 110, 130 and 140). Network 120 may be either wired or wireless. Examples of network 120 include, but are not limited to, a LAN, WAN, Internet, Intranet and the like. Note the segregation of functions described is logical and not physical. Therefore, it is possible for any combination of a client application, a web application, and a web services provider (endpoint) to coexist on the same physical computer without actually sending data across a network such as network 120. Further, the designation of client versus server may exist between any levels of this logical segregation. Therefore, client refers to a requesting application/computer and server refers to an application/computer servicing the request.